from fdfs_client.client import Fdfs_client# 1.创建fdfs客户端实例对象fdfs_client = Fdfs_client('client.conf')# 2.上传ret = fdfs_client.upload_by_filename('/Users/chao/Desktop/kk02.jpeg')f = open('/Users/chao/Desktop/kk02.jpeg', 'r')# content = f.read()# fdfs_client.upload_by_buffer(content)#print('xxxxx')print(ret)# {# 'Group name': 'group1',# 'Remote file_id': 'group1/M00/00/00/wKhn0l1WWTGAKNrkAAC4j90Tziw37.jpeg',# 'Status': 'Upload successed.',# 'Local file name': '/Users/chao/Desktop/01.jpeg',# 'Uploaded size': '46.00KB',# 'Storage IP': '192.168.103.210'}